package edu.scut.course_management.po;

/**
 * 持久化对象：班级
 * @author thompson
 */
public class Class {
    private Integer majorId;
    private String enrollmentYear;
    private String className;

    public Integer getMajorId() {
        return majorId;
    }

    public void setMajorId(Integer majorId) {
        this.majorId = majorId;
    }

    public String getEnrollmentYear() {
        return enrollmentYear;
    }

    public void setEnrollmentYear(String enrollmentYear) {
        this.enrollmentYear = enrollmentYear;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String toString() {
        return "Class {" + "className=" + className + 
               ", enrollmentYear=" + enrollmentYear + 
               ", majorId=" + majorId + 
               "]";
    }

    @Override
    public boolean equals(Object obj){
        if(!(obj instanceof Class)){
            return false;
        }
        else{
            return majorId.equals(((Class)obj).getMajorId())&&
                   enrollmentYear.equals(((Class)obj).getEnrollmentYear())&&
                   className.equals(((Class)obj).getClassName());
        }
    }

    
    
}